package com.fcscs.cservice.ws.client.inroomservice;

import org.apache.log4j.Logger;
import org.springframework.ws.client.core.support.WebServiceGatewaySupport;

import com.fcscs.cservice.ws.schema.inroomservice.GetCategoriesRequest;
import com.fcscs.cservice.ws.schema.inroomservice.GetCategoriesResponse;

public class GetCategoriesClient extends WebServiceGatewaySupport {

	private static final Logger LOG = Logger.getLogger(GetCategoriesClient.class);

	public GetCategoriesResponse getCategories(GetCategoriesRequest req) {
		GetCategoriesResponse resp = (GetCategoriesResponse)getWebServiceTemplate().marshalSendAndReceive(req);
		LOG.info("---------- GetCategoriesResponse: " + resp.getCategoryList() == null ? 0 : resp.getCategoryList().size());
		return resp;
	}
}
